function A(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('A');
        },1000)
    })
}
function B(){
    console.log('B');
}

async function foo(){
    await A()
    B()
}
foo()
